package com.example.boot.modules.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.example.starter.mybatis.anntation.DeleteTime;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 *
 * @author 王令
 * @since 2022-10-21
 */
@Data
@Accessors(chain = true)
@TableName("sys_tenant")
public class Tenant {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 租户id
     */
    private String tenantId;

    /**
     * 租户名
     */
    private String name;

    /**
     * logo
     */
    private String logo;

    /**
     * 状态
     */
    private Boolean enabled;

    /**
     * 开始时间
     */
    private LocalDateTime startTime;

    /**
     * 过期时间
     */
    private LocalDateTime endTime;


    /**
     * 逻辑删除
     */
    @JsonIgnore
    @TableLogic
    private Boolean deleted;

    /**
     * 删除时间
     */
    @JsonIgnore
    @DeleteTime
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime deleteTime;


}
